const path = require('path');
const CleanWebpackPlugin = require('clean-webpack-plugin');

module.exports = {
  entry: {
    client: '../src/client/index.js'
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        loader: 'babel-loader'
      }
    ]
  },
  plugins: [
    new CleanWebpackPlugin(['build']),
  ],
  output: {
    filename: '[name].bundle.js',
    path: path.resolve(__dirname, '/build')
  }
};
